package com.binest.kolInclusionMain.service.impl;

import java.util.List;
import com.binest.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.binest.kolInclusionMain.mapper.KolInclusionMainMapper;
import com.binest.kolInclusionMain.domain.KolInclusionMain;
import com.binest.kolInclusionMain.service.IKolInclusionMainService;

/**
 * KOL收录主Service业务层处理
 * 
 * @author wwd
 * @date 2024-01-16
 */
@Service
public class KolInclusionMainServiceImpl implements IKolInclusionMainService 
{
    @Autowired
    private KolInclusionMainMapper kolInclusionMainMapper;

    /**
     * 查询KOL收录主
     * 
     * @param id KOL收录主主键
     * @return KOL收录主
     */
    @Override
    public KolInclusionMain selectKolInclusionMainById(String id)
    {
        return kolInclusionMainMapper.selectKolInclusionMainById(id);
    }

    /**
     * 查询KOL收录主列表
     * 
     * @param kolInclusionMain KOL收录主
     * @return KOL收录主
     */
    @Override
    public List<KolInclusionMain> selectKolInclusionMainList(KolInclusionMain kolInclusionMain)
    {
        return kolInclusionMainMapper.selectKolInclusionMainList(kolInclusionMain);
    }

    /**
     * 新增KOL收录主
     * 
     * @param kolInclusionMain KOL收录主
     * @return 结果
     */
    @Override
    public int insertKolInclusionMain(KolInclusionMain kolInclusionMain)
    {
        kolInclusionMain.setCreateTime(DateUtils.getNowDate());
        return kolInclusionMainMapper.insertKolInclusionMain(kolInclusionMain);
    }

    /**
     * 修改KOL收录主
     * 
     * @param kolInclusionMain KOL收录主
     * @return 结果
     */
    @Override
    public int updateKolInclusionMain(KolInclusionMain kolInclusionMain)
    {
        kolInclusionMain.setUpdateTime(DateUtils.getNowDate());
        return kolInclusionMainMapper.updateKolInclusionMain(kolInclusionMain);
    }

    /**
     * 批量删除KOL收录主
     * 
     * @param ids 需要删除的KOL收录主主键
     * @return 结果
     */
    @Override
    public int deleteKolInclusionMainByIds(String[] ids)
    {
        return kolInclusionMainMapper.deleteKolInclusionMainByIds(ids);
    }

    /**
     * 删除KOL收录主信息
     * 
     * @param id KOL收录主主键
     * @return 结果
     */
    @Override
    public int deleteKolInclusionMainById(String id)
    {
        return kolInclusionMainMapper.deleteKolInclusionMainById(id);
    }

    @Override
    public int addLikeCount(String id) {
        return kolInclusionMainMapper.addLikeCount(id);
    }

    @Override
    public int reduceLikeCount(String id) {
        return kolInclusionMainMapper.reduceLikeCount(id);
    }

    @Override
    public int addNoLikeCount(String id) {
        return kolInclusionMainMapper.addNoLikeCount(id);
    }

    @Override
    public int reduceNoLikeCount(String id) {
        return kolInclusionMainMapper.reduceNoLikeCount(id);
    }
}
